package com.ludomancy.breathe;

public class Fire extends RoomObject
{
	private int turns = 0;
	private boolean isActive = false;
	
	private static final int STATE_CIGARETTE = 4;
	private static final int STATE_SMOKE = 13;
	private static final int STATE_FIRE = 20;
	
	public Fire()
	{
		super(0);
		activate();
	}

	public void doTurn()
	{
		if(isActive)
		{
			turns++;
			if(turns == STATE_CIGARETTE)
			{
				Game.game.addResponse("You hear something falling on the ground. Then you remember your cigarette in the ashtray. And then the rug.");				
			}
			else
			if(turns == STATE_SMOKE)
			{
				Game.game.addResponse("Smoke. Smells like a wet and dirty dog. It's the rug catching fire on the cigarette.");
			}
			else
			if(turns == STATE_FIRE)
			{
				Game.game.addResponse("You feel the heat of the fire on the rug. The air is even hotter and you are sweating a lot.");
				Game.game.anxiety = Game.MOOD_DESPERATE;
			}
		}
	}
	
	public boolean isSmoking()
	{
		return turns >= STATE_SMOKE;
	}
	
	public boolean isFiring()
	{
		return turns >= STATE_FIRE;
	}
	
	public boolean isPassable()
	{
		return true;
	}

	public void onBump()
	{
	}

	public void processOption(Option option)
	{
	}

	public void activate()
	{
		isActive = true;
	}

}
